package com.bitdf.txing.chat.service;

import com.alibaba.fastjson.JSONObject;
import com.bitdf.txing.chat.entity.ChatMessageEntity;
import com.bitdf.txing.chat.entity.ReadMessageEntity;
import com.bitdf.txing.chat.to.AddFriendRequestReplyTo;
import com.bitdf.txing.chat.to.GroupRequestAddTo;
import com.bitdf.txing.common.vo.UserInfoVo;
import io.netty.channel.ChannelHandlerContext;

import java.io.IOException;
import java.util.List;

/**
 * @author Lizhiwei
 * @date 2022/11/26 0:22:30
 * 注释：
 */
public interface ChatService {
    void singleSend(ChatMessageEntity chatMessageEntity, ChannelHandlerContext ctx);

    void sendMessage(ChannelHandlerContext context, String message);

    void groupSend(ChatMessageEntity chatMessage, ChannelHandlerContext ctx);

    List<Long> getOnlineFriends(List<UserInfoVo> friendsList);

    void groupRequestSend(GroupRequestAddTo groupRequestAddTo, ChannelHandlerContext ctx) throws IOException;

    void agreeOrRejectGroupRequest(GroupRequestAddTo groupRequestAddTo1, ChannelHandlerContext ctx) throws IOException;

    void addFriendRequestReply(AddFriendRequestReplyTo addFriendRequestReplyTo);

    void agreeOrRejectFriendRequest(AddFriendRequestReplyTo addFriendRequestReplyTo1);

    void register(JSONObject param, ChannelHandlerContext ctx);

    void readReplySend(ReadMessageEntity entity, ChannelHandlerContext ctx);

    void typeError(ChannelHandlerContext ctx);

    void remove(ChannelHandlerContext ctx);
}
